<%@page import="java.security.SecureRandom"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script language="javascript"
	src="/huahua/resources/js/jquery/jquery-2.2.4.min.js"></script>
<script type="text/javascript"
	src="/huahua/resources/js/jquerysession.js"></script>

<script type="text/javascript">
	function getPayment() {
		var xmlhttp;
		if (window.XMLHttpRequest) {
			//  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
			xmlhttp = new XMLHttpRequest();
		} else {
			// IE6, IE5 浏览器执行代码
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange = function() {

			document.getElementById("myDiv").innerHTML = xmlhttp.responseText;

		}
		xmlhttp.open("GET", "/huahua//user/myPayment.shtml", true);
		xmlhttp.send();
	}
</script>
<!-- Title  -->
<title>搜索商品</title>

<!-- script  -->
<script language="javascript" src="/huahua/resources/js/city.js"></script>
<!-- Favicon  -->
<link rel="icon" href="/huahua/resources/images/core-img/favicon.ico">

<!-- Core Style CSS -->
<link rel="stylesheet" href="/huahua/resources/css/core-style.css">
<script type="text/javascript"
	src="resources/js/jquery/jquery-2.2.4.min.js"></script>

</head>
<body>
	<!-- ##### Header Area Start ##### -->
	<header class="header_area">
		<div
			class="classy-nav-container breakpoint-off d-flex align-items-center justify-content-between">
			<!-- Classy Menu -->
			<nav class="classy-navbar" id="essenceNav">
				<!-- Logo -->
				<a class="nav-brand"
					href="http://localhost:8080/huahua/pages/front/index.jsp"><img
					src="/huahua/resources/images/core-img/logo.png" alt=""></a>
				<!-- Navbar Toggler -->
				<div class="classy-navbar-toggler">
					<span class="navbarToggler"><span></span><span></span><span></span></span>
				</div>
				<!-- Menu -->
				<div class="classy-menu">
					<!-- close btn -->
					<div class="classycloseIcon">
						<div class="cross-wrap">
							<span class="top"></span><span class="bottom"></span>
						</div>
					</div>
					<!-- Nav Start -->
					<div class="classynav">
						<ul>
							<li><a
								href="http://localhost:8080/huahua//good/getPaged.shtml?pageNum=1">Shop</a></li>

							<li><a href="<%=basePath%>/good/good_select_conditon.shtml">Search</a></li>
							<li><button type="button" onclick="getPayment()">我的订单</button></li>
							<li><a
								href="${ pageContext.request.contextPath }/good/cart.shtml">我的购物车</a></li>
							<li>${username}</li>
							<li>
								<form action="<%=basePath%>/good/good_select_conditon.shtml"
									method="get">
									商品名：<input type="text" name="name"><br> 品牌：<input
										type="text" name="brand"> <br> 颜色：<input
										type="text" name="colour"> <input type="submit"
										value="搜索">
								</form>
							</li>
						</ul>
					</div>
					<!-- Nav End -->
				</div>
			</nav>
			<!-- Header Meta Data -->
	

		</div>
	</header>
	<!-- ##### Header Area End ##### -->



	<div id="myDiv"></div>
	<!-- Cart Button -->
	<div class="cart-button">
		<a href="#" id="rightSideCart"><img src="img/core-img/bag.svg"
			alt=""> <span>3</span></a>
	</div>


 <section class="shop_grid_area section-padding-80">
	<div class="cart-content d-flex">
		<div class="cart-list">
			<c:forEach items="${ list }" var="good">
				<div class="single-cart-item">
					<a
						href="${ pageContext.request.contextPath }/good/getGoodDetails.shtml?id=${good.goodId}"
						class="product-image"><img src="${good.goodLike}" height="250"
						width="150" class="cart-thumb" alt="">

						<div class="product-description">
							<span class="product-remove"> <i class="fa fa-close"
								aria-hidden="true"></i></span> <span><c:out
									value="${good.goodBrand}" /></span>
							<h6>
								<c:out value="${good.goodName}" />
							</h6>
					
							<p class="product-price">
								价格每天：$
								<c:out value="${good.goodPrice}" />
							</p>
						</div> </a>
				</div>
				<br>
				<br>
			</c:forEach>

			<!-- Single Product -->
			<div class="col-12 col-sm-6 col-lg-4">
				<div class="single-product-wrapper">
					<!-- Product Image -->
					<div class="product-img">
						<img src="img/product-img/product-2.jpg" alt="">
						<!-- Hover Thumb -->
						<img class="hover-img" src="img/product-img/product-3.jpg" alt="">

						<!-- Favourite -->
						<div class="product-favourite">
							<a href="#" class="favme fa fa-heart"></a>
						</div>
					</div>

					<!-- Product Description -->
					<div class="product-description">
						<span>topshop</span> <a href="single-product-details.html">
							<h6>Knot Front Mini Dress</h6>
						</a>
						<p class="product-price">$80.00</p>

						<!-- Hover Content -->
						<div class="hover-content">
							<!-- Add to Cart -->
							<div class="add-to-cart-btn">
								<a href="#" class="btn essence-btn">Add to Cart</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>













	<!-- ##### Footer Area Start ##### -->
	<footer class="footer_area clearfix">
		<div align="center">
			<c:if test="${ pageNum == 1 }">
				<font color="white">首页&nbsp;上一页</font>
			</c:if>
			<c:if test="${ pageNum > 1 }">
				<font color="white"><a
					href="${pageContext.request.contextPath}/good/getPaged.shtml?pageNum=1">首页</a></font>
				<font color="white"><a
					href="${ pageContext.request.contextPath }/good/getPaged.shtml?pageNum=${ pageNum - 1 }">上一页</a></font>

			</c:if>
			<font color="white">${ pageNum }</font>
			<c:if test="${ pageNum == pageCount }">
				<font color="white">下一页&nbsp;末页</font>
			</c:if>
			<c:if test="${ pageNum < pageCount }">
				<font color="white"><a
					href="${pageContext.request.contextPath}/good/getPaged.shtml?pageNum=${ pageNum + 1 }">下一页</a></font>
				<font color="white"><a
					href="${ pageContext.request.contextPath }/good/getPaged.shtml?pageNum=${ pageCount }">末页</a></font>
			</c:if>
		</div>

	</footer>
	<!-- ##### Footer Area End ##### -->
	<!-- jQuery (Necessary for All JavaScript Plugins) -->
	<script src="/huahua/resources/js/jquery/jquery-2.2.4.min.js"></script>
	<!-- Popper js -->
	<script src="/huahua/resources/js/popper.min.js"></script>
	<!-- Bootstrap js -->
	<script src="/huahua/resources/js/bootstrap.min.js"></script>
	<!-- Plugins js -->
	<script src="/huahua/resources/js/plugins.js"></script>
	<!-- Classy Nav js -->
	<script src="/huahua/resources/js/classy-nav.min.js"></script>
	<!-- Active js -->
	<script src="/huahua/resources/js/active.js"></script>
</body>